<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }


        .header {
            width: 100%;
            padding: 10px;
            box-sizing: border-box;
            background-color: rgb(43, 178, 232)
        }

        .searchBox {
            display: flex;
        }

        .header h2 {
            color: white;
            font-size: 20px;
            margin: 10px 10px;
        }

        .header input {
            flex: 1;
            height: 40px;
            border-radius: 20px;
            outline: none;
            border: none;
            text-align: center;
        }

        .banner {
            width: 355px;
            height: 84px;
            border-radius: 5px;
            margin: 10px auto;
            background-color: rgb(43, 178, 232);
        }

        .block {
            width: 100%;
            padding: 10px;
            box-sizing: border-box;
        }

        .block .nav {
            display: flex;
            justify-content: space-between;
            font-weight: bolder;
            margin-top: 15px;
        }

        .block .text {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
        }

        .block .text span {
            display: inline-block;
            text-align: center;
            padding: 7px;
            border-radius: 3px;
            margin-right: 10px;
            margin-top: 10px;
            background-color: rgb(245, 238, 238);

        }

        .list {
            display: flex;
            margin-top: 20px;
        }

        .list img {
            width: 80px;
            height: 80px;
            margin-left: 10px;
        }

        .list .txt {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            margin-left: 10px;
        }

        .list p {
            color: rgb(96, 96, 96);
            font-size: 12px;
        }

        .list .ping {
            color: orangered;
            font-size: 12px;
        }

        .tabber {
            position: fixed;
            bottom: 0;
            width: 100%;
            height: 50px;
            border-top: 1px solid #ccc;
            background-color: aliceblue;
            display: flex;
            justify-content: space-around;
        }

        .btn {
            width: 33%;
            text-align: center;
            line-height: 50px;
        }

        .active {
            color: rgb(43, 178, 232);
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="header">

            <h2>饿了么</h2>
            <div class="searchBox">
                <input type="text" placeholder="输入商家，商品名称">
            </div>
        </div>


        <div class="banner">

        </div>

        <div class="block">
            <h4>猜你喜欢</h4>
            <div class="nav" :class="{active:currIndex==index}" @click="hanleClick(index)">
                <!-- <span>综合排序</span> -->
                <!-- <span>距离最近</span> -->
                <!-- <span>销量最高</span> -->
                <!-- <span>品质联盟</span> -->

                <div v-for="(item,index) in _list">{{ _list}}</div>
            </div>

            <div class="text">
                <span>年货节热卖</span>
                <span>律贴联盟</span>
                <span>满减忧惠</span>
                <span>品质联盟</span>
            </div>
        </div>

        <div class="list" v-for="(item,index) in listArr">
            <img :src="item.pic" alt="">
            <div class="txt">
                <h4>{{item.name}}</h4>
                <p>
                    <span class="ping">{{item.sore}}</span> 月售：<span>{{item.nums}}</span>
                </p>
                <p>
                    起送<span>{{item.send}}</span> 远距离配送<span>{{item.price}}</span>
                </p>

            </div>

        </div>

        <div class="tabber">
            <div :class="{active:currIndex==index}" @click="hanleClick(index)" class="btn" v-for="(item,index) in list">
                <div class="name">{{item.name}}</div>
            </div>

        </div>

    </div>

    <script src="1.vue-2.5.21.js"></script>
    <script src="5.zuoye-排序.js"></script>
</body>

</html>